<template>
  <div class="tabbar">
    <router-link tag="div" class="item" v-for="item in tabItems" :key="item.name" :to="item.to">
    <span>
      {{ item.name }}
    </span>
    </router-link>
  </div>
</template>

<script>
export default {
  name: "Tabbar",
  data() {
    return {
      tabItems: [
        {name: '推荐', to: '/recommend'},
        {name: '歌手', to: '/singer'},
        {name: '排行', to: '/rank'},
        {name: '搜索', to: '/search'},
      ]
    }
  }
}
</script>

<style scoped lang="scss">
@import "../assets/css/variable";
@import "../assets/css/mixin";

.tabbar {
  width: 100%;
  height: 84px;
  display: flex;
  justify-content: space-around;
  @include bg_sub_color();
  .item {
    span {
      @include font_color();
      @include font-size($font_medium);
      line-height: 84px;
    }

    border-bottom: 2px solid transparent;

    &.router-link-active {
      span {
        @include font_active_color();
      }

      @include border_color();
    }
  }
}
</style>
